package com.deliveryservicesystem.presentation.desktop;

import com.deliveryservicesystem.app.conf.InitDatabase;

/**
 * File Name: Run.java
 * Version:
 * Description:
 * Package: com.deliveryservicesystem.presentation.desktop
 * Author: Lance
 * Date: Jun 19, 2012
 * Editor:
 */
public class Run
{

    private static LoginDialog loginDialog;

    public static void main(String[] args)
    {
        loginDialog = new LoginDialog(null, true);
        if (loginDialog.getLoginSuccess())
        {
            createDatabase();
            new MainFrame();
        }
    }

    private static void createDatabase()
    {
        InitDatabase initDatabase = new InitDatabase();
        if (loginDialog.getInitDatabase())
        {
            initDatabase.initDatabase();
        }
        //initDatabase.createPersistenceUnit();
    }
}